<template>
  <div id="app">
     <Child title="单江伟" @hbb="hbb"/>
     <Child2 v-if="bool" title="贺森林" @hbb="hbb"/>
     <button @click="bool =!bool">bool</button>
  </div>
</template>
<script>
import Child from './components/Child.vue'
import Child2 from './components/Child2.vue'
export default {
    provide() {
      return {
        jiachan: 999999999999
      }
    },
    data() {
      return {
        bool:true
      }
    },
    components: {
      Child,
      Child2,
    },
    created() {
      this.$bus.$on('hyy', (e) => {
        console.log(e)
      })
    },
    methods: {
      hbb(e) {
        console.log(e)
      }
    }
}
</script>

<style lang="scss">
</style>
